﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ResourceFileManage.aspx.cs" Inherits="SkWeb.SystemManage.ResourceFileManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>资源文件管理</title>
    <link href="../easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <link href="../easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <script src="../easyui/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="../easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script type="text/javascript">

        function getQueryStringByName(name) {

            var result = location.search.match(new RegExp("[\?\&]" + name + "=([^\&]+)", "i"));

            if (result == null || result.length < 1) {

                return "";

            }

            return result[1];

        }

        $(function () {

            $("#divResourceFile").treegrid({
                url: '../Handlers/SchemeDesignHandler.aspx?op=gettemplatetree&pid=' + getQueryStringByName("pid"),
                idField: 'TMP_ID',
                treeField: 'TMP_MC',
                columns: [[
                    { title: '模版分类', field: 'TMP_MC', width: 480 },
                    {
                        title: '操作', field: 'TMP_URL',
                        formatter: function (value, rowData, rowIndex) {
                            if (rowData.TYP_CODE == 30) {
                                return "<a href='" + value + "' >下载</a>";
                            }
                            else {
                                return "";
                            }
                        }
                    }
                ]]
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="divResourceFile">
    
    </div>
    </form>
</body>
</html>
